package com.example.ibsp_demo.pojo.entity.login;

import java.time.LocalDateTime;

public class VerificationCode {
    private Integer vid;
    private String target;// 验证码接收目标（邮箱 or 手机号）
    private String code;
    private String type; // 验证码类型
    private LocalDateTime createTime;
    private LocalDateTime expireTime;
    private Integer isUsed; // 是否用过


    @Override
    public String toString() {
        return "VerificationCode{" +
                "vid=" + vid +
                ", target='" + target + '\'' +
                ", code='" + code + '\'' +
                ", type='" + type + '\'' +
                ", createTime=" + createTime +
                ", expireTime=" + expireTime +
                ", isUsed=" + isUsed +
                '}';
    }

    public Integer getVid() {
        return vid;
    }

    public void setVid(Integer vid) {
        this.vid = vid;
    }



    public String getTarget() {
        return target;
    }

    public void setTarget(String target) {
        this.target = target;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public LocalDateTime getExpireTime() {
        return expireTime;
    }

    public void setExpireTime(LocalDateTime expireTime) {
        this.expireTime = expireTime;
    }

    public Integer getIsUsed() {
        return isUsed;
    }

    public void setIsUsed(Integer isUsed) {
        this.isUsed = isUsed;
    }

    public VerificationCode() {
    }


    public VerificationCode(Integer vid, String target, String code, String type, LocalDateTime createTime, LocalDateTime expireTime, Integer isUsed) {
        this.vid = vid;
        this.target = target;
        this.code = code;
        this.type = type;
        this.createTime = createTime;
        this.expireTime = expireTime;
        this.isUsed = isUsed;
    }
}
